package com.woniuxy.broker.exceptionCenter;

import com.woniuxy.entity.ResponseResult;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @author booty
 * @version 1.0
 * @date 2021/3/24 11:01
 */
@RestControllerAdvice
public class ExceptionReturnHandler {

    @ExceptionHandler(Exception.class)
    public ResponseResult<?> handleException(Exception e){
        e.printStackTrace();
        return new ResponseResult<>(555,"服务器忙，请检查传入信息,或联系管理员",e.getMessage());
    }


}
